package com.buba.livenuniappservernew.api.Enum;

/**
 * 实体类中逻辑删除字段枚举类
 * @author mading
 *  @since 2024-09-04
 */
public enum DeleteEnum {
//
//    private final Integer code;//参数值
//    private final String desc;//值描述
//
//
//
//    //2.私有化类的构造器，并给对象属性赋值
//    DeleteEnum(Integer code, String desc) {
//        this.code = code;
//        this.desc = desc;
//    }
//    //3.提供当前枚举类的多个对象：public static final的
//    public static final DeleteEnum DELETE = new DeleteEnum(1,"删除");
//    public static final DeleteEnum UNDELETE = new DeleteEnum(0,"显示");
//
//    //4.其他诉求1：获取枚举类对象的属性
//    public Integer getCode() {
//        return code;
//    }
//    public String getDesc() {
//        return desc;
//    }
//    //4.其他诉求2：提供toString()方法
//    @Override
//    public String toString() {
//        return "DeleteEnum{" +
//                "code='" + code + '\'' +
//                ", desc='" + desc + '\'' +
//                '}';
//    }

    UN_DELETE(0,"显示"),
    DELETE(1,"删除");

    private final Integer code;//参数值
    private final String desc;//值描述


    DeleteEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }
    public String getDesc() {
        return desc;
    }
}
